Programming in Java NPTEL Assignment Solution Week 2